package com.iris.live.services.data.models;

import javax.persistence.*;
import java.sql.Timestamp;

/**
 * Created by DF on 9/18/2016.
 */
@Entity
@Table(name = "LSH精品套餐详细", schema = "sg_lsh", catalog = "")
@IdClass(Lsh精品套餐详细ModelPK.class)
public class Lsh精品套餐详细Model {
    private int 套餐编号;
    private int 精品编号;
    private String 精品数量;
    private Double 精品折扣;
    private String 更新账号;
    private Timestamp 更新时间;

    @Id
    @Column(name = "套餐编号")
    public int get套餐编号() {
        return 套餐编号;
    }

    public void set套餐编号(int 套餐编号) {
        this.套餐编号 = 套餐编号;
    }

    @Id
    @Column(name = "精品编号")
    public int get精品编号() {
        return 精品编号;
    }

    public void set精品编号(int 精品编号) {
        this.精品编号 = 精品编号;
    }

    @Basic
    @Column(name = "精品数量")
    public String get精品数量() {
        return 精品数量;
    }

    public void set精品数量(String 精品数量) {
        this.精品数量 = 精品数量;
    }

    @Basic
    @Column(name = "精品折扣")
    public Double get精品折扣() {
        return 精品折扣;
    }

    public void set精品折扣(Double 精品折扣) {
        this.精品折扣 = 精品折扣;
    }

    @Basic
    @Column(name = "更新账号")
    public String get更新账号() {
        return 更新账号;
    }

    public void set更新账号(String 更新账号) {
        this.更新账号 = 更新账号;
    }

    @Basic
    @Column(name = "更新时间")
    public Timestamp get更新时间() {
        return 更新时间;
    }

    public void set更新时间(Timestamp 更新时间) {
        this.更新时间 = 更新时间;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Lsh精品套餐详细Model that = (Lsh精品套餐详细Model) o;

        if (套餐编号 != that.套餐编号) return false;
        if (精品编号 != that.精品编号) return false;
        if (精品数量 != null ? !精品数量.equals(that.精品数量) : that.精品数量 != null) return false;
        if (精品折扣 != null ? !精品折扣.equals(that.精品折扣) : that.精品折扣 != null) return false;
        if (更新账号 != null ? !更新账号.equals(that.更新账号) : that.更新账号 != null) return false;
        if (更新时间 != null ? !更新时间.equals(that.更新时间) : that.更新时间 != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = 套餐编号;
        result = 31 * result + 精品编号;
        result = 31 * result + (精品数量 != null ? 精品数量.hashCode() : 0);
        result = 31 * result + (精品折扣 != null ? 精品折扣.hashCode() : 0);
        result = 31 * result + (更新账号 != null ? 更新账号.hashCode() : 0);
        result = 31 * result + (更新时间 != null ? 更新时间.hashCode() : 0);
        return result;
    }
}
